package com.naiterui.ehp.bp.constants;


public enum MessageTypeEnum {

    TEXT (1, "文本消息", ""),
    IMAGE (2, "图片消息","[图片消息]"),
    VOICE (4, "语音消息", "[语音消息]"),
    VIDEO (8, "视频消息","[小视频]"),
    DRUG (16, "药方消息", "[药方消息]"),
    REMIND_PATIENTS_FILL_MEDICAL_RECORD (10004, "系统扩展消息", "[患者病情描述]"),
    MESSAGE_TYPE_DOCTORS_MEDICAL_RECORD (10005, "医生填写的病历消息", "[病历消息]"),
    MESSAGE_TYPE_PATIENTS_SERVICE_EVALUATION(10006, "患者服务评价", "[评价消息]"),
    MESSAGE_TYPE_PATIENTS_FOLLOW_UP(10013, "患者随访", "[随访消息]");

    private Integer type;
    private String typeName;
    private String viewContent;

    MessageTypeEnum(Integer type, String typeName, String viewContent) {
        this.type = type;
        this.typeName = typeName;
        this.viewContent = viewContent;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getViewContent() {
        return viewContent;
    }

    public void setViewContent(String viewContent) {
        this.viewContent = viewContent;
    }


    public static MessageTypeEnum getByType(Integer type) {
        for (MessageTypeEnum msgType : MessageTypeEnum.values()) {
            if (msgType.getType().equals(type)) {
                return msgType;
            }
        }
        return null;
    }
}
